#杨辉三角前6行
#第n行有n项
#[[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1]]

lst = [[1],[1,1]]
for i in range(2,6):
    cur = [1]
    pre = lst[i-1]
    for j in range(len(pre)-1):
        cur.append(pre[j]+pre[j+1])
        if j == len(pre)-2:
            cur.append(1)
    lst.append(cur)
print(lst)